package com.mz.mattress.client.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mz.mattress.api.entity.MattressMessageRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MattressMessageRecordMapper extends BaseMapper<MattressMessageRecord> {

    @Select("SELECT id,device_code,product_key,method,data_method,data_content,create_time from mz_mattress_message_record ORDER BY id desc LIMIT 20")
    List<MattressMessageRecord> list();

    @Select("SELECT id,data from mz_mattress_message_record ORDER BY id desc LIMIT 50")
    List<MattressMessageRecord> listData();

}
